package com.icode.core.model.manage;

import com.icode.core.model.AbstractEntity;
import com.icode.core.model.house.HouseWeekTime;
import com.icode.core.model.house.MyHouseStatus;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-7-1
 * Time: 上午9:33
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "reserve_time")
public class ReserveTime extends AbstractEntity {

    @ManyToOne
    @JoinColumn(name = "reserve_id")
    private Reserve reserve;
    @ManyToOne
    @JoinColumn(name = "house_week_time_id")
    private HouseWeekTime houseWeekTime;

    @Column(name = "status")
    @Enumerated(EnumType.STRING)
    private MyHouseStatus status;


    public ReserveTime() {
    }

    public ReserveTime(Reserve reserve, HouseWeekTime houseWeekTime,MyHouseStatus status) {
        this.reserve = reserve;
        this.houseWeekTime = houseWeekTime;
        this.status = status;
    }

    public Reserve reserve() {
        return reserve;
    }

    public HouseWeekTime houseWeekTime() {
        return houseWeekTime;
    }

     public MyHouseStatus status(){
         return  status;
     }

    public void upDateStatus(MyHouseStatus status ){
        this.status =status;
    }

}
